home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
date.z
/
date
Wrap
Text File
|
1998-10-20
|
18KB
|
393 lines
ddddaaaatttteeee((((1111)))) ddddaaaatttteeee((((1111))))
NNNNAAAAMMMMEEEE
_dddd_aaaa_tttt_eeee - write and set the date and time
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
_dddd_aaaa_tttt_eeee [ _----_uuuu ] [ _++++ _f_o_r_m_a_t ]
_dddd_aaaa_tttt_eeee [ _----_aaaa [ _---- ] _s_s_s_...._f_f_f ]
_dddd_aaaa_tttt_eeee [ _----_uuuu | _----_nnnn ] [[ _m_m_d_d]_H_H_M_M | _m_m_d_d_H_H_M_M[_c_c]_y_y ] [ ._s_s ]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
If no argument is given, or if the argument begins with _++++, the current
date and time are printed. Otherwise, the current date is set if the
user has appropriate privileges and the system permits the setting of the
system date and time.
Supplementary code set characters in _++++_f_o_r_m_a_t (see below) are recognized
and displayed according to the locale specified in the _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE
environment variable [see _LLLL_AAAA_NNNN_GGGG on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)]. Month and weekday names
are recognized according to the locale specified in the _LLLL_CCCC______TTTT_IIII_MMMM_EEEE
environment variable, as described below.
OOOOPPPPTTTTIIIIOOOONNNNSSSS
_----_aaaa [ _---- ] _s_s_s_...._f_f_f
Slowly adjust the time by _s_s_s._f_f_f seconds (_f_f_f represents
fractions of a second). This adjustment can be positive or
negative. The system's clock will be sped up or slowed down
until it has drifted by the number of seconds specified.
_----_nnnn Do not attempt to notify the network time daemon _t_i_m_e_d(1m) of
the time change (or more accurately the daemon listening to
the _tttt_iiii_mmmm_eeee_dddd UDP port). This option should be used if you are
not using that daemon. If not used, the daemon is notified
of the date change, and if it is acting as the master, the
date change will be broadcast to the time daemons on other
systems.
_----_uuuu Display (or set) the date in Greenwich Mean Time (GMT-
universal time), bypassing the normal conversion to (or from)
local time.
The notation GMT may change in the future to the equivalent
notation UTC (Coordinated Universal Time).
_m_m is the month number
_d_d is the day number in the month
_H_H is the hour number (24 hour system)
_M_M is the minute number
PPPPaaaaggggeeee 1111
ddddaaaatttteeee((((1111)))) ddddaaaatttteeee((((1111))))
_s_s is the second(s) number
_c_c is the century minus one
_y_y is the last 2 digits of the year number
The month, day, year, and century may be omitted; the current
values are supplied as defaults.
For example:
_dddd_aaaa_tttt_eeee _1111_0000_0000_8888_0000_0000_4444_5555
sets the date to Oct 8, 12:45 AM.
The current year is the default because no year is supplied. The system
operates in GMT. _dddd_aaaa_tttt_eeee takes care of the conversion to and from local
standard and daylight time. The date can be changed only if the user has
appropriate privileges and the system permits the setting of the system
date and time.
After successfully setting the date and time, _dddd_aaaa_tttt_eeee displays the new date
according to the default format. The _dddd_aaaa_tttt_eeee command uses _TTTT_ZZZZ to determine
the correct time zone information [see _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)].
OOOOPPPPEEEERRRRAAAANNNNDDDDSSSS
_++++ _f_o_r_m_a_t
If the argument begins with _++++, the output of _dddd_aaaa_tttt_eeee is under the
control of the user. Each Field Descriptor, described below, is
preceded by _%%%% and is replaced in the output by its corresponding
value. A single _%%%% is encoded by _%%%%_%%%%. All other characters are
copied to the output without change. The string is always
terminated with a newline character. If the argument contains
embedded blanks it must be quoted (see the EXAMPLE section).
Supplementary code set characters may be used in _f_o_r_m_a_t.
As noted, month and weekday names are recognized according to the locale
specified in the _LLLL_CCCC______TTTT_IIII_MMMM_EEEE environment variable [see _LLLL_AAAA_NNNN_GGGG on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)].
The names are taken from a file whose format is specified in _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee(4).
This file also defines country-specific date and time formats such as _%%%%_cccc,
which specifies the default date format. The following form is the
default for _%%%%_cccc:
_%%%%_aaaa _%%%%_bbbb _%%%%_eeee _%%%%_TTTT _%%%%_ZZZZ _%%%%_YYYY
e.g., Fri Dec 23 10:10:42 EST 1988
Field Descriptors (must be preceded by a _%%%%):
_aaaa locale's abbreviated weekday name
_AAAA locale's full weekday name
_bbbb locale's abbreviated month name
PPPPaaaaggggeeee 2222
ddddaaaatttteeee((((1111)))) ddddaaaatttteeee((((1111))))
_BBBB locale's full month name
_cccc locale's appropriate date and time representation
_CCCC century (a year divided by 100 and truncated to an integer) as a
decimal number [00-99]
_dddd day of month as a decimal number [01-31]
_DDDD date as _%%%%_mmmm_////_%%%%_dddd_////_%%%%_yyyy
_eeee day of month as a decimal number [1-31] (single digits are
preceded by a blank)
_hhhh locale's abbreviated month name (alias for _%%%%_bbbb)
_HHHH hour (24-hour clock) as a decimal number [00-23]
_IIII hour (12-hour clock) as a decimal number [01-12]
_jjjj day of year as a decimal number [001-366]
_mmmm month of year as a decimal number [01-12]
_MMMM minute as a decimal number [00-59]
_nnnn insert a newline character
_pppp string containing ante-meridian or post-meridian indicator (by
default, AM or PM)
_rrrr 12-hour clock time [01-12] using the AM/PM notation, as _%%%%_IIII_::::_%%%%_MMMM_::::_%%%%_SSSS
_%%%%_pppp
_RRRR time as _%%%%_HHHH_::::_%%%%_MMMM
_SSSS seconds as a decimal number [00-61], allows for leap seconds
_tttt insert a tab character
_TTTT 24-hour clock time [00-23], as _%%%%_HHHH_::::_%%%%_MMMM_::::_%%%%_SSSS
_uuuu weekday as a decimal number [1(Monday)-7]
_UUUU week number of year (Sunday as the first day of the week) as a
decimal number [00-53]. All days in a new year preceding the
first Sunday are considered to be in week 0.
_VVVV week of the year (Monday as the first day of the week) as a
decimal number [01-53]. If the week containing January 1 has four
or more days in the new year, then it is considered week 1;
otherwise, it is week 53 of the previous year, and the next week
is week 1. ( See the ISO 8601:1988 standard)
_wwww weekday as a decimal number [0(Sunday)-6]
_WWWW week of year (Monday as the first day of the week) as a decimal
number [00-53]. All days in a new year preceding the first
Sunday are considered to be in week 0.
_xxxx locale's appropriate date representation
_XXXX locale's appropriate time representation
_yyyy year within century (offset from %C) as a decimal number [00-99]
_YYYY year as _c_c_y_y (4 digits)
_ZZZZ timezone name, or no characters if no timezone is determinable
_%%%% insert a percent sign character
Modified Field Descriptors (must be preceded by a _%%%%):
Some field descriptors can be modified by the E and O modifier characters
to indicate a different format or specification as specified in the
LC_TIME locale description (see the XBD specification). If the
corresponding keyword is not specified or not supported for the current
locale, the unmodified field descriptor value will be used.
PPPPaaaaggggeeee 3333
ddddaaaatttteeee((((1111)))) ddddaaaatttteeee((((1111))))
_EEEE_cccc locale's alternative appropriate date and time representation
_EEEE_CCCC name of the base year (period) in the locale's alternative
representation
_EEEE_xxxx locale's alternative date representation
_EEEE_XXXX locale's alternative time representation
_EEEE_yyyy offset from %EC (year only) in the locale's alternative
representation
_EEEE_YYYY full alternative year representation
_OOOO_dddd day of the month using the locale's alternative numeric symbols
_OOOO_eeee day of the month using the locale's alternative numeric symbols
_OOOO_HHHH hour (24 hour clock) using the locale's alternative numeric
symbols
_OOOO_IIII hour (12 hour clock) using the locale's alternative numeric
symbols
_OOOO_mmmm month using the locale's alternative numeric symbols
_OOOO_MMMM minutes using the locale's alternative numeric symbols
_OOOO_SSSS seconds using the locale's alternative numeric symbols
_OOOO_uuuu weekday as a number in the locale's alternative representation
(Monday=1)
_OOOO_UUUU week number of the year (Sunday as first day of the week) using
the locale's alternative numeric symbols
_OOOO_VVVV week number of the year (Monday as first day of the week, rules
corresponding to %V) using the locale's alternative numeric
symbols
_OOOO_wwww weekday as a number in the locale's alternative representation
(Sunday=0)
_OOOO_WWWW week number of the year (Monday as first day of the week) using
the locale's alternative numeric symbols
_OOOO_yyyy year (offset from %C) in alternative representation
EEEEXXXXAAAAMMMMPPPPLLLLEEEE
The command
_dddd_aaaa_tttt_eeee _''''_++++_DDDD_AAAA_TTTT_EEEE_:::: _%%%%_mmmm_////_%%%%_dddd_////_%%%%_yyyy_%%%%_nnnn_TTTT_IIII_MMMM_EEEE_:::: _%%%%_HHHH_::::_%%%%_MMMM_::::_%%%%_SSSS_''''
generates as output:
_DDDD_AAAA_TTTT_EEEE_:::: _0000_8888_////_0000_1111_////_7777_6666
_TTTT_IIII_MMMM_EEEE_:::: _1111_4444_::::_4444_5555_::::_0000_5555
EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
The following environment variables affect the execution of _dddd_aaaa_tttt_eeee:
_LLLL_AAAA_NNNN_GGGG provide a default value for the internationalization variables that
are unset or null. If _L_A_N_G is unset or null the corresponding value
from the implementation-specific default locale will be used. If any
of the internationalization variables contains an invalid setting,
the utility will behave as if none of the variables had been
defined.
PPPPaaaaggggeeee 4444
ddddaaaatttteeee((((1111)))) ddddaaaatttteeee((((1111))))
_LLLL_CCCC______AAAA_LLLL_LLLL
if set to a non-empty string value, override the values of all the
other internationalization variables.
_LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE
determine the locale for the interpretation of sequences of bytes of
text data as characters (for example, single - as opposed to multi-
byte - characters in arguments).
_LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS
determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard error.
_LLLL_CCCC______TTTT_IIII_MMMM_EEEE
determine the format and contents of date and time strings written
by _d_a_t_e
_NNNN_LLLL_SSSS_PPPP_AAAA_TTTT_HHHH
determine the location of message catalogs for the processing of
_L_C__M_E_S_S_A_G_E_S.
_TTTT_ZZZZ determine the timezone in which the time and date are written,
unless the ----uuuu option is specified. If the _T_Z variable is not set and
the ----uuuu is not specified, an unspecified system default timezone is
used.
SSSSTTTTDDDDOOOOUUUUTTTT
When no formatting operand is specified, the output in the POSIX locale
is equivalent to specifying:
_dddd_aaaa_tttt_eeee _""""_++++_%%%%_aaaa _%%%%_bbbb _%%%%_eeee _%%%%_HHHH_::::_%%%%_MMMM_::::_%%%%_SSSS _%%%%_ZZZZ _%%%%_YYYY_""""
FFFFIIIILLLLEEEESSSS
_////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS_////_uuuu_xxxx_cccc_oooo_rrrr_eeee_...._aaaa_bbbb_iiii
language-specific message file [See _LLLL_AAAA_NNNN_GGGG on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn (5).]
SSSSEEEEEEEE AAAALLLLSSSSOOOO
_ssss_yyyy_ssss_llll_oooo_gggg(3), _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee(4), _tttt_iiii_mmmm_eeee_dddd(1M), _tttt_iiii_mmmm_eeee_ssss_llll_aaaa_vvvv_eeee(1M), _uuuu_tttt_mmmm_pppp(4), _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
UX:date:ERROR:No permission
You do not have the appropriate privileges and you try
to change the date.
UX:date:ERROR:bad conversion
The date set is syntactically incorrect.
NNNNOOOOTTTTEEEESSSS
If you attempt to set the current date to one of the dates on which the
standard and alternate time zones change (for example, the date that
daylight time is starting or ending), and you attempt to set the time to
a time in the interval between the end of standard time and the beginning
of the alternate time (or the end of the alternate time and the beginning
PPPPaaaaggggeeee 5555
ddddaaaatttteeee((((1111)))) ddddaaaatttteeee((((1111))))
of standard time), the results are unpredictable.
If you are running a network-based time service, such as timed, then it
will override any changes you make with the date command.
PPPPaaaaggggeeee 6666